<jsp:include page="/WEB-INF/views/layouts/header.jsp" />
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="s"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<!--中间部分开始-->
<div class="main">
	<!-- 左侧 -->
	<jsp:include page="/WEB-INF/views/account/sidebar.jsp" />
	<!-- /左侧 -->
	<!-- 核心内容区域 -->
	<div id="iaas_layout_content" class="rightblock">
		<p class="shadow"></p>
		<div class="content">
			<!--默认状态下引用样式ml60，展开后引用样式ml140-->
			<div class="mainblock">
				<div class="tabA">
					<h1>更新产品</h1>
				</div>
				<div class="zhgl_1 zhxxxg">
					<h5>产品信息</h5>
					<form:form action="/product/toUpdate/${product.id }" method="POST" modelAttribute="product" validate="true">
						<table width="100%" border="0" cellpadding="0" cellspacing="0">
							<tr>
								<td width="8%"><p>产品名称：</p>
								</td>
								<td width="92%"><form:input path="productName"
										validate="true" data-required="true" null-message="产品不能为空 ！"
										data-type="lengthLimit" min-length="1" max-length="20"
										message="产品不允许超过20个字符！" />
										<form:errors path="productName" cssClass="validation-error" />
										</td>
							</tr>
							<tr>
								<td><p>发行银行：</p>
								</td>
								<td><form:select path="bankId">
								<c:forEach items="${bankList }" var="bank">
								      <option value="${bank.id }" <c:if test="${product.bankId == bank.id}">selected="selected"</c:if>>${bank.name }</option>
								      </c:forEach>
									</form:select></td>
									<form:errors path="bankId" cssClass="validation-error" />
							</tr>
							<tr>
								<td><p>币种：</p>
								</td>
								<td><form:select path="curtype">
										<option value="1" <c:if test="${ product.curtype == 1}">selected="selected"</c:if>>人民币</option>
										<option value="2" <c:if test="${ product.curtype == 2}">selected="selected"</c:if>>美元</option>
										<option value="3"  <c:if test="${product.curtype == 3}">selected="selected"</c:if>>港币</option>
										<option value="4" <c:if test="${product.curtype == 4}">selected="selected"</c:if>>欧元</option>
										<option value="5" <c:if test="${product.curtype == 5}">selected="selected"</c:if>>英镑</option>
										<option value="6" <c:if test="${product.curtype == 6}">selected="selected"</c:if>>澳元</option>
										<option value="7"  <c:if test="${product.curtype == 7}">selected="selected"</c:if>>其他币种</option>
								</form:select>
								<form:errors path="curtype" cssClass="validation-error" />
								</td>
							</tr>
							<tr>
								<td><p>收益类型：</p></td>
								<td><form:select path="incomeType">
										<option value="1" <c:if test="${product.incomeType == 1}">selected="selected"</c:if>>保本固定收益类型</option>
										<option value="2" <c:if test="${product.incomeType == 2}">selected="selected"</c:if>>保本浮动收益类型</option>
										<option value="3" <c:if test="${product.incomeType == 3}">selected="selected"</c:if>>非保本浮动收益类型</option>
										<option value="0" <c:if test="${product.incomeType == 0}">selected="selected"</c:if>>暂未发布</option>
								</form:select>
								<form:errors path="incomeType" cssClass="validation-error" />
								</td>
							</tr>
							<tr>
								<td><p>管理期限：</p></td>
								<td><form:input path="runtimeTime"/><span class="cuegray"></span></td>
							</tr>
							<tr>
								<td><p style="width:130px;">预期最高收益率：</p>
								</td>
								<td><form:input path="expectedHeigh"/>
								<form:errors path="expectedHeigh" cssClass="validation-error" /></td>
							</tr>
							<tr>
								<td><p>起始金额：</p>
								</td>
								<td><form:input path="individualAmount"/>
								<form:errors path="individualAmount" cssClass="validation-error" /></td>
							</tr>
							<tr>
								<td><p>起售开始：</p>
								</td>
								<td>
									<form:input id="d5221" path="sellStart"  onfocus="WdatePicker({dateFmt:'yyyy/MM/dd'})" class="Wdate"/><form:errors path="sellStart" cssClass="validation-error" /></td>
							</tr>
							<tr>
								<td><p>起售结束：</p>
								</td>
								<td><form:input path="sellEnd"  type="text" id="d242" onfocus="WdatePicker({dateFmt:'yyyy/MM/dd'})" class="Wdate"/><form:errors path="sellEnd" cssClass="validation-error" /></td>
							</tr>
							<tr>
								<td><p>发行地区：</p>
								</td>
								<td><form:input path="salesArea" type="text"/><form:errors path="salesArea" cssClass="validation-error" /></td>
							</tr>
							<tr>
							<td><p>是否展示：</p></td>
							<td><form:select path="ifShow">
										<option value="1" <c:if test="${product.ifShow == 1}">selected="selected"</c:if>>显示状态</option>
										<option value="0" <c:if test="${product.ifShow == 0}">selected="selected"</c:if>>隐藏状态</option>
										
								</form:select>
								<form:errors path="ifShow" cssClass="validation-error" /></td>
						</tr>
					</table>
				</div>
				<div class="btnblock ">
					<input type="submit" value="保 存"
						class="btngreen01 linkhand" />
				</div>
				</form:form>
				
			</div>
		</div>
	</div>
</div>
<!--中间部分结束-->
<!--底部开始-->
<jsp:include page="/WEB-INF/views/layouts/footer.jsp" />
<!--底部结束-->

</body>
</html>
